<!doctype html>
<html>
<head>
<meta charset="utf-8">

<link href="../css/einterview.css" rel='stylesheet' type='text/css'>
<link href="../jQueryAssets/jquery.ui.core.min.css" rel="stylesheet" type="text/css">
<link href="../jQueryAssets/jquery.ui.theme.min.css" rel="stylesheet" type="text/css">
<link href="../jQueryAssets/jquery.ui.datepicker.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="../tinymce/js/tinymce/tinymce.min.js"></script>
<script src="../jQueryAssets/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="../jQueryAssets/jquery-ui-1.9.2.datepicker.custom.min.js" type="text/javascript"></script>
<link type='text/css' href='css/demo.css' rel='stylesheet' media='screen' />
<link type='text/css' href='css/osx.css' rel='stylesheet' media='screen' />
<script type="text/javascript" src="TimePicker/jquery.timepicker.js"></script>
<link rel="stylesheet" type="text/css" href="TimePicker/jquery.timepicker.css" />
<script type="text/javascript" src="TimePicker/lib/site.js"></script>
<script type="text/javascript">
tinymce.init({
    selector: "textarea"
 });
</script>
<?php

include('../php/db.php');

$db = new mysqli('localhost',$usercon,$passcon,'flss');

if ($_SESSION['login'] == NULL)
{
 header("Location: ../index.php");	
} 
else
{
$login = $_SESSION['login'];

$userid = mysql_query("SELECT * FROM `flss`.`accounts` WHERE `user` = '$login'");
while($rowshow = mysql_fetch_array($userid))
{
	$getid = $rowshow['account_id'];
}


}
?>
<title>
Interview Schedule
</title>
</head>
<body style="background-color: white;">

<?php
 include __DIR__ . "/../php/header.php";
?>
<br>
<br>
<br>
<style>
.font{
   font-family: 'Gadugi';
}
.title{
  font-family: 'Gadugi';
  text-align:center;
  padding-top:60px;
  background-color: rgb(250,250,250);
  border-bottom:1px solid #CCCCCC;
  width:100%;
  height:130px
}
</style>
<div class="title"><font size=6><b>Hired Applicants</div></font></b>
            
						<table style="padding-left:150px; padding-right:150px; padding-top:10px;">
					   <tr>
                        <th align="left">Applicant Name</th>
                        <th align="left">Job Title</th>
                        <th align="left">Date Hired</th>
                      </tr>
                        
					   <?php 
					    $getallhired = mysql_query("SELECT CONCAT(a.fname,' ',a.lname,' y ',a.mname ) as fullname, e.ename as cname, jo.title as title, ha.date_hired as dhire, a.refid as refid
					   							FROM hired_applicants ha
												left join applicant a on ha.applicant_id = a.applicant_id 
												left join employer e on ha.employer_id = e.employer_id
												left join job_order jo on ha.job_id = jo.job_id
												WHERE ha.employer_id = '$getid'
												") or die(mysql_error());

					   	while($row = mysql_fetch_array($getallhired)){ ?> 
						<tr>
                        <td><a href="../applicant/viewapplicant.php?refid=<?=$row['refid']?>" onClick="window.open(this.href,'popupwindow','left=200,top=50,width=1000,height=600,scrollbars=yes,menu=0,status=0'); return false;">
						<?=$row['fullname'];?></td>
                        <td><?=$row['title'];?></td>
                        <td><?php 
						$datehire = $row['dhire'];
						$datime = new DateTime($datehire);
						print $datime->format("F d, Y");
						?></td>
                      </tr>
                       <?php } ?>
            
                    </table>
<?php
 include __DIR__ . "/../php/footer.php";

?>
</body>
</html>